<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />

<title>Main Page</title>


<link rel="stylesheet" type="text/css" href="resource/main_page/main-page.css" />
<!--[if IE]>
<style type="text/css">
.tr1 td.td1{border-top:0}
.t4{padding:0}
.t table{border-collapse:collapse;}
.t {padding:0}
</style>
<![endif]-->
<script type="text/javascript" language="JavaScript" src="resource/main_page/main_page.js"></script>


</head>

<body onkeydown="try{keyCodes(event);}catch(e){}">
<%@ include file="ForumHead.jsp" %>
<div class="main-wrap">
<div id="main">
<style type="text/css">
.t table tr.tr2 td.f{width:22%;}
.t table tr.tr2 td.e{width:10em;}
</style>
<div class="forum-info cc gray">
<div class="fr"> <s:if test="#session.user!=null">
            welcome,${session.user.unikey}
            You may change your <s:a href="UserAction_displayProfileBasic"><b>profile</b></s:a> | <a href="LoginAction_out"><b>Logout</b></a>
            </s:if>
            <s:else>
            welcome,please <s:a href="login.jsp"><b>login</b></s:a>
            </s:else>
</div>
</div>
<!--<div class="noticebg">
<div id="notice">
<div id="notice0" style="width:98%;height:18px;line-height:18px;overflow-y:hidden;">
<ul>
<li><a href="">ELEC Notice2</a> <span class="f9 gray">11-09-05</span></li>
<li><a href="">ELEC Notice</a> <span class="f9 gray">11-09-01</span></li>
</ul>
</div><div style="height: 36px;overflow-y: hidden;"></div>
</div>
</div> -->
<div class="contentc"></div>
<div id="content">
<div class="contentwrap z">
<div class="t z" id="t_1">
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<th class="h" colspan="6">
<h2>&raquo; <a href="" class="cfont">Forum</a></h2>
</th>
</tr>
<tbody id="cate_1" style="display::">
<tr class="tr2">
<td width="*" colspan="2" class="tac">Section</td>
<td class="tal y-style e">Article</td>
<td class="tal y-style f">Last Post</td>
<s:if test="#session.user.role.roleId == 3"><td class="tal y-style f">operation</td></s:if>
</tr>
<s:iterator value="categories">
<tr class="tr3 f_one" id="fid_4">
<td class="icon tac" width="45"><a href="" target="_blank"><img src="resource/main_page/section-label.gif" /></a></td>
<th>
    <s:url id="url_view" value="ThreadAction_listThreads">
    <s:param name="categoryID" value="categoryId"/>
    <s:param name="categoryName" value="categoryName"/></s:url>
    <h3 class="b"><s:a href="%{url_view}" id="fn_4"><s:property value="categoryName"/></s:a></h3>
    <div><span class="gray">Moderator:<s:iterator value="users"><s:property value="unikey"/>&nbsp;</s:iterator></span>
<span class="forumslink s5"></span>
</div>
</th>
<td class="tal y-style f10 e gray"><span class="s3">&nbsp;&nbsp;&nbsp;<s:property value="articleCount"/></span></td>
<th>
    <s:if test="lastThread!=null">
    <s:url id="url_thread" value="ThreadAction_viewThread">
    <s:param name="categoryID" value="categoryId"/>
    <s:param name="categoryName" value="categoryName"/>
    <s:param name="threadID" value="lastThread.threadId"/></s:url>
<s:a href="%{url_thread}" class="a2">title:<s:property value="lastThread.threadTitle"/></s:a><br />
<span class="gray">author:<s:property value="lastThread.user.unikey"/></span><br />
<span class="f9 gray">time:<s:date name="lastThread.postDate" format="yyyy-MM-dd HH:mm"/></span></s:if>
<s:else>none</s:else>
&nbsp;
</th>
<s:if test="#session.user.role.roleId == 3"><th>
    <s:url id="url_setting" value="CategoryActionAdmin_setting">
    <s:param name="categoryID" value="categoryId"/>
    <s:param name="categoryName" value="categoryName"/>
    </s:url>
    <s:a href="%{url_setting}" class="a2">setting</s:a>
    </th></s:if>
</tr>
</s:iterator>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>

</html>
<script language="JavaScript" src="resource/main_page/fast_access.js"></script>
<%@ include file="ForumFoot.jsp" %>